﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Raise3000
{
    public partial class PlayerTemplateSelector : Form
    {
        List<string> playerTemplatesList = null;

        string selectedPlayerTemplateName = null;

        public PlayerTemplateSelector()
        {
            InitializeComponent();
        }

        public PlayerTemplateSelector(List<string> listOfPlayerTemplate)
        {
            InitializeComponent();

            playerTemplatesList = listOfPlayerTemplate;
        }

        public string GetSelectedPlayerTemplateName()
        {
            return selectedPlayerTemplateName;
        }

        // events
        private void PlayerTemplateSelector_Load(object sender, EventArgs e)
        {
            PlayerTemplateComboBox.DataSource = playerTemplatesList;
        }

        private void PlayerTemplateComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedPlayerTemplateName = (string)PlayerTemplateComboBox.SelectedItem;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
